Skip to content

Public replication-summary page (/np/replications)#98

Merged
j34ni merged 2 commits into
mainfrom
feat/replication-summary-page
Jun 16, 2026
Merged

Public replication-summary page (/np/replications)#98
j34ni merged 2 commits into
mainfrom
feat/replication-summary-page

Conversation

@annefou

@annefou annefou commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

What

A public page — /np/replications?doi=<DOI> — that shows every independent replication of a paper's claims on the nanopub network and the verdict each reached. Grouped by the claim tested, each replication shows its study's scope / methodology / deviations, conclusion, materials, and a link to the signed Outcome nanopub.

Built so the Replication Radar (OpenAIRE hackathon) can link out from "5 replications" to one clean page instead of cramming five links into a card.

Design decisions

  • Public, client-side, no auth/backend change. Reads only public nanopub-network data via SPARQL (frontend/src/lib/sparql.ts). The authenticated API is untouched — programmatic use still requires registration, exactly the intended split.
  • Enumerates via CiTO→DOI, not /np/constellation BFS. Verified empirically that the constellation graph-BFS bleeds into adjacent papers (it pulled a lizard paper into a bumble-bee chain) and misses disconnected replications, whereas the CiTO→DOI verdict-citation method returns the correct set (Soroye 2020 → its 5 replications).
  • Retraction/supersession-aware. Drops any outcome retracted/invalidated/superseded by a nanopub from the same creator (a third-party retracts can't suppress someone else's work). Run as a scoped guard query because an inline FILTER NOT EXISTS times the endpoint out; best-effort so a guard failure never hides everything.

Test

/np/replications?doi=10.1126/science.aax8591 → Soroye 2020's 5 replications (4 confirmed, 1 partial), grouped by claim.

Checks

  • typecheck -w frontend: pass · build -w frontend: pass · lint: 0 errors (1 set-state-in-effect warning, consistent with 7 existing in np/ pages)
  • No schema/migration/auth changes.

annefou added 2 commits June 15, 2026 21:06
A public page that, given a paper DOI, shows every independent replication of its
claims on the nanopub network and the verdict each reached — grouped by the claim
tested, with each study's scope/methodology/deviations, conclusion, materials and
signed Outcome nanopub.

Design:
- Client-side, unauthenticated: reads only public nanopub-network data via SPARQL
  (frontend/src/lib/sparql.ts), so the page works for anyone. The authenticated API
  stays for programmatic/registered use — no backend or auth change.
- Enumerates via the CiTO->DOI verdict-citation method, NOT /np/constellation graph
  BFS: verified empirically that BFS bleeds into adjacent papers (it pulled a lizard
  paper into a bumble-bee chain) and misses disconnected replications, while CiTO->DOI
  returns the correct set (e.g. Soroye 2020 -> its 5 replications).
- Retraction/supersession-aware: drops any outcome retracted/invalidated/superseded
  by a nanopub from the same creator. Run as a scoped guard query (an inline
  FILTER NOT EXISTS times the endpoint out); best-effort so a guard failure never
  hides everything.

Route: /np/replications?doi=10.1126/science.aax8591
Follow the house SPARQL convention (agent-docs/SPARQL.md): the query now lives in
queries/replications-by-paper.rq with a header comment + ?_doiUri placeholder, its
types are generated (npm run generate:query-types), and replications.ts runs it via
executeBindSparql() with the AbortSignal — no more hand-built query strings in the TS.

Also adopts the admin-graph validity guard idiom from aida-statement-nanopub.rq:
filter not exists { ?inv npx:invalidates ?outcome ; npa:hasValidSignatureForPublicKeyHash ?pubkey }
— npx:invalidates covers retract+supersede and the matching pubkey hash is the
cryptographic signer, so it runs inline in one efficient query (no separate scoped
guard, no endpoint timeout). Verdict relations are selected via VALUES in the query.
@j34ni j34ni merged commit becc93d into main Jun 16, 2026
15 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants